<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"/>
		<meta name="renderer" content="webkit|ie-comp|ie-stand">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
		<link href="Css/backstage_common_v2.11.css" rel="stylesheet" />
		<link href="Css/backstage_v2.11.css" rel="stylesheet" />
		<script src="Js/jquery-1.11.3.min.js"></script>
		<script src="Js/common.js"></script>
		<title></title>
	</head>
	<body>
		<div class="pub-title">后台管理</div>
		<ul class="pub-tab">
			<li class="option-list">
				<a href="article.html" class="option">文章</a>
				<a href="article_classify.html" class="option on">分类</a>
			</li>
			<li class="tab-block-list">
				<div class="head-tip">
					<a href="article_classify_detail.html" class="pub-btn">新增分类</a>
				</div>
				<table class="pub-table">
					<tr>
						<th width="80"></th>
						<th>分类名称</th>
						<th width="80">排序</th>
						<th width="300">操作</th>
					</tr>
					<tr class="checkbox">
						<td><input type="checkbox"/></td>
						<td>
							<span class="j-subordinate article-class" state="0">
								<span class="iconfont">&#xe604;</span>&nbsp;帮助中心
							</span>
						</td>
						<td>1</td>
						<td>
							<a href="javascript:" class="pub-btn pub-btn-white">新增下级</a>
							<a href="javascript:" class="pub-btn pub-btn-white">编辑</a>
							<a href="javascript:" class="pub-btn pub-btn-white">删除</a>
						</td>
					</tr>
					<tr class="checkbox sed" style="display: none;">
						<td><input type="checkbox"/></td>
						<td >帮助中心</td>
						<td>1</td>
						<td>
							<a href="javascript:" class="pub-btn pub-btn-white">编辑</a>
							<a href="javascript:" class="pub-btn pub-btn-white j-del">删除</a>
						</td>
					</tr>
					<tr class="checkbox sed" style="display: none;">
						<td><input type="checkbox"/></td>
						<td >帮助中心</td>
						<td>1</td>
						<td>
							<a href="javascript:" class="pub-btn pub-btn-white">编辑</a>
							<a href="javascript:" class="pub-btn pub-btn-white j-del">删除</a>
						</td>
					</tr>
					<tr class="checkbox">
						<td><input type="checkbox"/></td>
						<td class="iconfont">
							<span class="j-subordinate article-class" state="0">
								<span class="iconfont">&#xe604;</span>&nbsp;帮助中心
							</span>
						</td>
						<td>1</td>
						<td>
							<a href="javascript:" class="pub-btn pub-btn-white">新增下级</a>
							<a href="javascript:" class="pub-btn pub-btn-white">编辑</a>
							<a href="javascript:" class="pub-btn pub-btn-white">删除</a>
						</td>
					</tr>
					<tr class="checkbox sed" style="display: none;">
						<td><input type="checkbox"/></td>
						<td >帮助中心</td>
						<td>1</td>
						<td>
							<a href="javascript:" class="pub-btn pub-btn-white">编辑</a>
							<a href="javascript:" class="pub-btn pub-btn-white j-del">删除</a>
						</td>
					</tr>
				</table>
			</li>
		</ul>

		
	</body>
</html>

<script>
	$('.j-subordinate').click(function(event) {
	    var iconfont=$(this).find('.iconfont');
		if($(this).attr('state')==0){
            iconfont.html('&#xe666;');
            $(this).attr('state',1);
			$(this).parents('tr').nextAll('tr').each(function(){
				if(!$(this).hasClass('sed'))return false;
				$(this).show();
			});
		}else{
            $(this).attr('state',0);
            iconfont.html('&#xe604;');
			$(this).parents('tr').nextAll('tr').each(function(){
				if(!$(this).hasClass('sed'))return false;
				$(this).hide();
			});
		}
	});

	$('.j-del').click(function(){
		var p=$(this).parents('tr');
		if(!p.hasClass('sed')){
			p.nextAll('tr').each(function(){
				if(!$(this).hasClass('sed'))return false;
				$(this).remove();
			});
		}
		p.remove();
	})

</script>